package com.shenyi.shop.service;

import com.shenyi.shop.api.ITopicService;
import com.shenyi.shop.dao.TopicMapper;
import com.shenyi.shop.entity.TopicDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author richard.fan
 * @version 1.0
 * @date 2018/11/05
 * @desc
 * @see
 * @since 1.0
 */
@Service
public class TopicServiceImpl implements ITopicService {


    @Autowired
    private TopicMapper topicMapper;

    @Override
    public TopicDO queryObject(Integer id) {
        return topicMapper.queryObject(id);
    }

    @Override
    public List<TopicDO> queryList(Map<String, Object> map) {
        return topicMapper.queryList(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map) {
        return topicMapper.queryTotal(map);
    }

    @Override
    public int save(TopicDO topic) {
        return topicMapper.save(topic);
    }

    @Override
    public int update(TopicDO topic) {
        return topicMapper.update(topic);
    }

    @Override
    public int delete(Integer id) {
        return topicMapper.delete(id);
    }

    @Override
    public int deleteBatch(Integer[] ids) {
        return topicMapper.deleteBatch(ids);
    }
}
